package com.liantong.service.cms;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.liantong.common.mapper.CategoryMapper;
import com.liantong.common.po.Category;
import com.liantong.common.po.CategoryExample;

@Service("categoryService")
public class CategoryService {
	
	@Resource(name="categoryMapper")	
	CategoryMapper categoryMapper;
	
	public List<Category> getCategorys() {
		CategoryExample example = new CategoryExample();
		example.createCriteria().andIdIsNotNull();
		return categoryMapper.selectByExample(example);
	}
	
	public int insertCategory(Category category){
		return categoryMapper.insert(category);
	}

}
